home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 74 65 6c 65 70 6f 73 74 | 2e 6e 6f 21 73 74 61 74 |telepost|.no!stat|
|00000030| 6f 69 6c 21 75 73 65 6e | 65 74 0a 46 72 6f 6d 3a |oil!usen|et.From:|
|00000040| 20 42 6a 6f 72 6e 20 54 | 68 6f 6d 61 73 73 65 6e | Bjorn T|homassen|
|00000050| 20 3c 6b 6f 6e 62 6f 74 | 40 53 54 2e 53 74 61 74 | <konbot|@ST.Stat|
|00000060| 6f 69 6c 2e 6e 6f 74 65 | 73 2e 74 65 6c 65 6d 61 |oil.note|s.telema|
|00000070| 78 3e 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |x>.Subje|ct: Re: |
|00000080| 55 73 69 6e 67 20 42 43 | 34 2e 35 20 54 41 72 72 |Using BC|4.5 TArr|
|00000090| 61 79 41 73 56 65 63 74 | 6f 72 20 6f 66 20 6d 79 |ayAsVect|or of my|
|000000a0| 20 63 6c 61 73 73 20 69 | 6e 20 61 20 63 6c 61 73 | class i|n a clas|
|000000b0| 73 21 0a 43 6f 6e 74 65 | 6e 74 2d 54 79 70 65 3a |s!.Conte|nt-Type:|
|000000c0| 20 74 65 78 74 2f 70 6c | 61 69 6e 3b 20 63 68 61 | text/pl|ain; cha|
|000000d0| 72 73 65 74 3d 75 73 2d | 61 73 63 69 69 0a 4d 65 |rset=us-|ascii.Me|
|000000e0| 73 73 61 67 65 2d 49 44 | 3a 20 3c 31 39 39 36 4a |ssage-ID|: <1996J|
|000000f0| 61 6e 34 2e 30 38 34 33 | 31 36 2e 36 38 35 39 40 |an4.0843|16.6859@|
|00000100| 73 74 61 74 6f 69 6c 2e | 6e 6f 3e 0a 54 6f 3a 20 |statoil.|no>.To: |
|00000110| 62 65 73 65 63 40 77 6d | 69 6e 2e 61 63 2e 75 6b |besec@wm|in.ac.uk|
|00000120| 0a 53 65 6e 64 65 72 3a | 20 75 73 65 6e 65 74 40 |.Sender:| usenet@|
|00000130| 73 74 61 74 6f 69 6c 2e | 6e 6f 0a 4e 6e 74 70 2d |statoil.|no.Nntp-|
|00000140| 50 6f 73 74 69 6e 67 2d | 48 6f 73 74 3a 20 31 34 |Posting-|Host: 14|
|00000150| 33 2e 39 37 2e 31 30 38 | 2e 31 35 36 0a 43 6f 6e |3.97.108|.156.Con|
|00000160| 74 65 6e 74 2d 54 72 61 | 6e 73 66 65 72 2d 45 6e |tent-Tra|nsfer-En|
|00000170| 63 6f 64 69 6e 67 3a 20 | 37 62 69 74 0a 4f 72 67 |coding: |7bit.Org|
|00000180| 61 6e 69 7a 61 74 69 6f | 6e 3a 20 44 65 6c 66 69 |anizatio|n: Delfi|
|00000190| 20 44 61 74 61 20 41 53 | 0a 52 65 66 65 72 65 6e | Data AS|.Referen|
|000001a0| 63 65 73 3a 20 3c 44 4b | 4d 48 4a 45 2e 42 30 42 |ces: <DK|MHJE.B0B|
|000001b0| 40 77 65 73 74 6d 69 6e | 73 74 65 72 2e 61 63 2e |@westmin|ster.ac.|
|000001c0| 75 6b 3e 0a 4d 69 6d 65 | 2d 56 65 72 73 69 6f 6e |uk>.Mime|-Version|
|000001d0| 3a 20 31 2e 30 0a 44 61 | 74 65 3a 20 54 68 75 2c |: 1.0.Da|te: Thu,|
|000001e0| 20 34 20 4a 61 6e 20 31 | 39 39 36 20 30 38 3a 34 | 4 Jan 1|996 08:4|
|000001f0| 33 3a 31 36 20 47 4d 54 | 0a 58 2d 4d 61 69 6c 65 |3:16 GMT|.X-Maile|
|00000200| 72 3a 20 4d 6f 7a 69 6c | 6c 61 20 31 2e 31 4e 4f |r: Mozil|la 1.1NO|
|00000210| 56 20 28 57 69 6e 64 6f | 77 73 3b 20 49 3b 20 31 |V (Windo|ws; I; 1|
|00000220| 36 62 69 74 29 0a 0a 54 | 68 65 20 73 6f 6c 75 74 |6bit)..T|he solut|
|00000230| 69 6f 6e 20 74 6f 20 79 | 6f 75 72 20 70 72 6f 62 |ion to y|our prob|
|00000240| 6c 65 6d 20 69 73 20 74 | 68 61 74 20 61 6e 20 69 |lem is t|hat an i|
|00000250| 6e 73 74 61 6e 63 65 20 | 6f 66 20 54 53 41 72 72 |nstance |of TSArr|
|00000260| 61 79 41 73 56 65 63 74 | 6f 72 20 6e 65 65 64 73 |ayAsVect|or needs|
|00000270| 20 61 74 20 6c 65 61 73 | 74 20 0a 6f 6e 65 20 61 | at leas|t .one a|
|00000280| 72 67 75 6d 65 6e 74 20 | 28 75 70 70 65 72 29 20 |rgument |(upper) |
|00000290| 74 6f 20 62 65 20 63 6f | 6e 73 74 72 75 63 74 65 |to be co|nstructe|
|000002a0| 64 2e 20 54 6f 20 6d 61 | 6b 65 20 69 74 20 64 79 |d. To ma|ke it dy|
|000002b0| 6e 61 6d 69 63 61 6c 2c | 20 79 6f 75 20 6e 65 65 |namical,| you nee|
|000002c0| 64 20 74 6f 20 70 72 6f | 76 69 64 65 20 0a 61 6c |d to pro|vide .al|
|000002d0| 6c 20 74 68 72 65 65 20 | 61 72 67 75 6d 65 6e 74 |l three |argument|
|000002e0| 73 3a 20 75 70 70 65 72 | 2c 20 6c 6f 77 65 72 2c |s: upper|, lower,|
|000002f0| 20 64 65 6c 74 61 20 3a | 0a 0a 0a 50 61 63 6b 3a | delta :|...Pack:|
|00000300| 3a 50 61 63 6b 28 29 20 | 3a 20 70 61 63 6b 28 35 |:Pack() |: pack(5|
|00000310| 32 29 0a 7b 0a 20 20 20 | 20 20 20 20 20 43 61 72 |2).{. | Car|
|00000320| 64 20 63 61 72 64 3b 0a | 20 20 20 20 20 20 20 20 |d card;.| |
|00000330| 53 55 49 54 20 73 75 69 | 74 3b 0a 20 20 20 20 20 |SUIT sui|t;. |
|00000340| 20 20 20 52 41 4e 4b 20 | 72 61 6e 6b 3b 0a 0a 20 | RANK |rank;.. |
|00000350| 20 20 20 20 20 20 20 4e | 75 6d 62 65 72 4f 66 43 | N|umberOfC|
|00000360| 61 72 64 73 3d 30 3b 0a | 0a 20 20 20 20 20 20 20 |ards=0;.|. |
|00000370| 20 66 6f 72 28 73 75 69 | 74 3d 63 6c 75 62 73 3b | for(sui|t=clubs;|
|00000380| 73 75 69 74 3c 3d 73 70 | 61 64 65 73 3b 73 75 69 |suit<=sp|ades;sui|
|00000390| 74 2b 2b 29 0a 20 20 20 | 20 20 20 20 20 20 20 20 |t++). | |
|000003a0| 20 20 20 20 20 66 6f 72 | 28 72 61 6e 6b 3d 74 77 | for|(rank=tw|
|000003b0| 6f 3b 72 61 6e 6b 3c 3d | 61 63 65 3b 72 61 6e 6b |o;rank<=|ace;rank|
|000003c0| 2b 2b 29 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |++). | |
|000003d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 0a 20 20 | | {. |
|000003e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 61 | | ca|
|00000400| 72 64 2e 53 65 74 53 75 | 69 74 28 73 75 69 74 29 |rd.SetSu|it(suit)|
|00000410| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00000420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000430| 20 20 63 61 72 64 2e 53 | 65 74 52 61 6e 6b 28 72 | card.S|etRank(r|
|00000440| 61 6e 6b 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ank);. | |
|00000450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000460| 20 20 20 20 20 20 63 61 | 72 64 2e 53 65 74 46 61 | ca|rd.SetFa|
|00000470| 63 65 28 64 6f 77 6e 29 | 3b 0a 20 20 20 20 20 20 |ce(down)|;. |
|00000480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000490| 20 20 20 20 20 20 20 20 | 20 20 41 64 64 43 61 72 | | AddCar|
|000004a0| 64 28 63 61 72 64 29 3b | 0a 20 20 20 20 20 20 20 |d(card);|. |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004c0| 20 20 20 20 20 20 20 20 | 20 4e 75 6d 62 65 72 4f | | NumberO|
|000004d0| 66 43 61 72 64 73 2b 2b | 3b 0a 20 20 20 20 20 20 |fCards++|;. |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004f0| 20 20 7d 0a 7d 0a 0a 0a | 0a 41 73 20 79 6f 75 20 | }.}...|.As you |
|00000500| 63 61 6e 20 73 65 65 2c | 20 6a 75 73 74 20 61 64 |can see,| just ad|
|00000510| 64 20 27 3a 20 70 61 63 | 6b 28 35 32 29 27 20 61 |d ': pac|k(52)' a|
|00000520| 74 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |t the en|d of the|
|00000530| 20 66 75 6e 63 74 69 6f | 6e 20 64 65 66 69 6e 69 | functio|n defini|
|00000540| 74 69 6f 6e 20 68 65 61 | 64 65 72 0a 0a |tion hea|der.. |
+--------+-------------------------+-------------------------+--------+--------+